@import './variables.less';
@import './font-family.less';

// layout rewrite
.t-layout__sider {
  width: fit-content;
}

@media screen and (max-width: 428px) {
  .t-head-menu__inner{
    width: max-content;
  }
  .t-head-menu .t-menu__operations:not(:empty){
    overflow: initial;
  }
  .t-layout{
    width: fit-content;
  }
}


.t-layout.t-layout--with-sider {
  > .t-layout {
    flex: 1;
    min-width: 760px;
  }
}

.t-layout.t-layout--with-sider {
  > .t-layout__content {
    flex: 1;
    min-width: 760px;
  }
}

.t-menu--dark .t-menu__operations .t-icon {
  color: rgba(255, 255, 255, 0.55);
  &:hover {
    cursor: pointer;
  }
}
.t-default-menu.t-menu--dark {
  background: var(--td-gray-color-13);
}
.t-default-menu:not(.t-menu--dark) .t-menu__item.t-is-active:not(.t-is-opened) {
  background-color: var(--td-brand-color-1);
  color: var(--td-brand-color);
  //border-left: 4px solid #006CD9;
  border-left: 4px solid #006eff;
  .t-icon {
    color: var(--td-brand-color);
  }
}
.t-default-menu .t-menu__sub .t-menu__item{
  border-left: 4px solid #fff;
}

.t-alert--info {
  background-color: var(--td-brand-color-1);
}

.@{prefix} {
  // 布局元素调整
  &-wrapper {
    height: 100vh;
    display: flex;
    flex-direction: column;
  }

  &-main-wrapper {
    height: 500px;
    overflow: scroll;
  }

  &-side-nav-layout {
    &-relative {
      height: 100%;
    }
  }

  &-content-layout {
    padding: @spacer-l; // 修改 @spacer-3 -> @spacer-l
  }

  &-layout {
    height: calc(100vh - 64px);
    overflow-y: scroll;

    &-tabs-nav {
      max-width: 100%;
      position: fixed;
      overflow: visible;
      z-index: 100;
    }
    &-tabs-nav + .@{prefix}-content-layout {
      //padding-top: @spacer-3;
      display: flex;
      flex-direction: column;
    }

    //&::-webkit-scrollbar {
    //  width: 8px;
    //  background: transparent;
    //}
    //
    //&::-webkit-scrollbar-thumb {
    //  border-radius: 6px;
    //  border: 2px solid transparent;
    //  background-clip: content-box;
    //  background-color: var(--td-scrollbar-color);
    //}
    // 修改
    .t-table thead td, .t-table th{
      font-size: 14px;
      font-weight: 500;
      color: rgb(29, 33, 41);
      background-color: #F2F3F5;
    }
    .base-container {
      background-color: @bg-color-container;
      padding: 10px;
      border-radius: @border-radius;
      flex: 1;
    }
    .apply-form {
      height: 74vh;
      width: 100%;
      overflow: auto;
      overflow-x: hidden;
    }
    .query-form-inline{
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 10px;
      .t-form{
        margin: 0;
      }
      .t-form__item{
        margin: 0;
      }
      .t-form__label{
        padding-right: 10px;
      }
    }
    .btn-group-inline{
      display: flex;
      margin-bottom: 10px;
      gap: 10px;
    }
    &-tabs-nav{
      .t-tabs__nav-item.t-size-m {
        height: 30px;
      }
      .t-tabs__btn.t-size-m{
        height: 30px;
      }
    }
    .t-table__body{
      td {
        .t-button-link{
          margin-right: 0px;
        }
        .t-button + .t-button{
          margin-left: 0px;
        }
      }
    }
  }

  &-footer-layout {
    padding: 0;
    margin-bottom: @spacer-2;
  }

  // slideBar
  &-sidebar-layout {
    height: 100%;
  }

  &-sidebar-compact {
    width: 64px;
  }

  &-sidebar-layout-side {
    z-index: 100;
  }

  &-side-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 200;
    transition: all 0.3s;
    min-height: 100%;

    &-mix {
      top: 55px;

      &-fixed {
        top: 55px;
        z-index: 0;
      }
    }

    &-no-fixed {
      position: relative;
      z-index: 1;
    }

    &-no-logo {
      z-index: 1;
    }

    &-logo-wrapper {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      &:hover {
        cursor: pointer;
      }
    }

    &-logo-t-logo {
      height: 32px;
      width: 100%;
    }

    &-logo-tdesign-logo {
      padding: 0 24px;
      height: 32px;
      width: 100%;
      color: var(--td-text-color-primary);
    }

    &-logo-normal {
      color: var(--td-brand-color);
      font-size: @font-size-l;
      transition: all 0.3s;
    }
  }

  &-side-nav-placeholder {
    flex: 1 1 232px;
    min-width: 232px;
    transition: all 0.3s;

    &-hidden {
      flex: 1 1 72px;
      min-width: 72px;
      transition: all 0.3s;
    }
  }
}

.route-tabs-dropdown {
  .t-icon {
    margin-right: 8px;
  }
}

.logo-container {
  cursor: pointer;
  display: inline-flex;
  height: 64px;
  margin-left: 24px;
}

.version-container {
  color: @text-color-primary;
  opacity: 0.4;
  display: flex; // 修改
  justify-content: center; // 修改
}


// 修改
.operation-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.no-margin-padding-dropdown-item{
  .t-dropdown__item {
    margin: 0px;
    padding: 0px;
  }
}


.link-type, .link-type:focus{
  color: #337ab7;
  cursor: pointer;
  text-decoration: none;
}

.new-label{
  .t-form__label{
    background-color: #F1F1F1;
    border: 1px solid #EEEEEE;
    padding-right: 10px;
  }
  //.t-form__controls-content{
  //  border: 1px solid red;
  //  padding: 10px 0px 10px 8px;
  //}
}

.cursor-pointer{
  cursor: pointer;
}

.table-form{
  .t-radio.t-is-disabled .t-radio__label{
    color: unset
  }
  .t-is-error .t-input__extra{
    position: static;
  }
  .t-form__item:not(.no-table){
    width: 100%;
    .t-form__label{
      display: none;
    }
  }
  .t-row:not(.no-table){
    align-items: stretch;
    margin-bottom: 0 !important;
    .require {
      color: red;
      margin-right: 3px;
    }
    .t-col:not(.no-table){
      border: 1px solid #ddd;
      color: #333;
      min-height: 37px;
      padding: 4px !important;
      //overflow: hidden;
      display: flex;
      align-items: center;
      margin:0px -1px -1px 0px;
    }
    .title{
      background-color: #FAFAFA;
      justify-content: center;
      margin:0px -1px -1px 0px;
      //color: #606266;
    }
    .sub-title{
      background-color: #FAFAFA;
      justify-content: start;
      margin:0px -1px -1px 0px;
    }
    .text-center{
      justify-content: center;
    }
    .sub-col{
      display: flex;
      flex-direction: column;
      .t-row{
        width: 100%;
      }
    }
  }
}


.indent2 {
  text-indent: 2em;
}
.indent3 {
  text-indent: 3em;
}
.indent4 {
  text-indent: 4em;
}
.indent6 {
  text-indent: 6em;
}